{extend name="sign/base"/}
{block name='title'}登录{/block}

{block name="main"}
<h3>{:get_config('site_name')}管理后台</h3>
<p>请用email及您的密码登录后台管理系统</p>
<form class="m-t ajax-form" role="form" action="{:url(request()->module() . '/Sign/login')}" method="post" data-error-callback="changeCode">
    <div class="form-group">
        <input type="text" class="form-control" name="username" placeholder="邮箱" value="{$Think.cookie.username|default=''}" required>
    </div>
    <div class="form-group">
        <input type="password" class="form-control" name="password" placeholder="密码" value="{$Think.cookie.password|default=''}" required autocomplete="off">
    </div>
    <div class="form-group">
        <input type="text" class="form-control" name="code" autocomplete="off" placeholder="验证码" required="">
        <div><img id="code" src="{:url(request()->module() . '/Sign/captcha')}" alt="captcha" onclick="this.src='{:url(request()->module() . \'/Sign/captcha\')}'+ '?' + new Date().getTime()" style="cursor:pointer;margin-top:6px"></div>
    </div>
    <input type="hidden" name="redirect" value="{$Request.param.redirect}">
    <button type="submit" class="btn btn-primary block full-width m-b">登录</button>

    <a href="{:url(request()->module() . '/Sign/forget')}"><small>忘记密码?</small></a>
    <!--
    <a class="btn btn-sm btn-white btn-block" href="{:url('Login/register')}">注册</a>
    -->
</form>
{/block}
{block name="js"}
<script type="text/javascript">
    if (window != top) {
        //top.location.href = location.href;
    }
</script>
{/block}
